Skip to content

Release : 파티 목록 카테고리, 최신순, 거리순 정렬 (v.1.2.0)#84

Merged
milowon merged 57 commits intomainfrom
develop
Jan 4, 2026
Merged

Release : 파티 목록 카테고리, 최신순, 거리순 정렬 (v.1.2.0)#84
milowon merged 57 commits intomainfrom
develop

Conversation

@milowon
Copy link
Contributor

@milowon milowon commented Jan 4, 2026

📝 상세 내용

  • 파티 목록 카테고리, 최신순, 거리순 정렬

Summary by CodeRabbit

릴리즈 노트

  • 새로운 기능
    • 위치 기반 파티 목록 정렬 기능 추가: 사용자 현재 위치를 기준으로 거리순 정렬 가능
    • 파티 목록 조회 시 거리순 또는 최신순 정렬 옵션 제공
    • 거리 표시 형식 개선: 킬로미터 단위의 소수점 표기로 더 정확한 거리 정보 제공

✏️ Tip: You can customize this high-level summary in your review settings.

yyytir777 and others added 30 commits December 8, 2025 10:50
* feat : google login 구현 완료 (ios 구현 중)
* feat : google login 구현 완료
* fix : user hard delete
* feat : apple 로그인 구현 및 ddl-auto -> update 변경
* 약관 엔티티 생성 및 연관관계 설정

* 회원가입에 약관 저장 로직 추가

* 서버에서 idToken을 받아올 수 없으므로 단순히 이메일로 accessToken을 받아오는 test API 추가
* feat : 파티 엔티티 정의

* feat : 파티 dto

* feat : party dto 정의

* feat : party entity 정의

* feat : 파티 생성,수정,삭제, 조회

partycontroller
partyservice
partyrepository

* feat : 거리 계산 클래스

* refactor : 불필요한 코드 삭제

* refactor : token provider로 유저 아이디 추출하도록 변경

* Fix: 파티 기능 버그 수정

* docs : 파티 swagger 문서 추가
@milowon milowon self-assigned this Jan 4, 2026
@milowon milowon added the enhancement New feature or request label Jan 4, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 4, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

파티 목록 조회 기능에 거리 기반 정렬 지원이 추가되었습니다. 컨트롤러에서 sortType, userLat, userLon 파라미터를 받아 PartyListRequest 객체로 구성한 후 서비스에 전달합니다. 서비스는 정렬 타입에 따라 거리 또는 최신순으로 파티를 조회하고 정렬합니다. 거리 기반 정렬 시에는 PartyCardResponse의 distanceKm 필드에 포맷된 거리 문자열을 설정합니다. DistanceCalculator의 formatDistance 메서드는 1km 미만의 거리를 소수점 한 자리의 킬로미터 형식으로 반환하도록 수정되었습니다.

Sequence Diagram

sequenceDiagram
    participant Client
    participant Controller as PartyController
    participant Service as PartyService
    participant DB as Repository
    participant Calculator as DistanceCalculator

    Client->>Controller: GET /parties?category=...&sortType=DISTANCE<br/>&userLat=37.5&userLon=126.9
    
    rect rgb(220, 240, 255)
    Note over Controller: 파라미터 검증
    Controller->>Controller: sortType이 DISTANCE인 경우<br/>위도/경도 범위 검증
    end
    
    Controller->>Controller: PartyListRequest 생성<br/>(category, sortType, userLat, userLon)
    Controller->>Service: getPartyList(userId, request)
    
    rect rgb(220, 255, 220)
    Note over Service: 파티 조회
    Service->>DB: findByCategory() 또는<br/>fetchPartiesByLocation()
    DB-->>Service: Party 리스트
    end
    
    alt sortType == DISTANCE
        rect rgb(255, 240, 220)
        Note over Service: 거리 기반 정렬
        loop 각 Party마다
            Service->>Calculator: calculateDistance(party.lat, party.lon,<br/>userLat, userLon)
            Calculator-->>Service: distance (Double)
            Service->>Service: convertToCardResponseWithDistance<br/>(party, distance)
            Service->>Calculator: formatDistance(distance)
            Calculator-->>Service: 포맷된 거리 (String)
        end
        Service->>Service: DISTANCE 기준으로 정렬
        end
    else sortType == LATEST
        Service->>Service: LATEST 기준으로 정렬
    end
    
    Service-->>Controller: PartyListResponse
    Controller-->>Client: 200 OK with parties
Loading

Possibly related PRs

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 16104d0 and 4474664.

📒 Files selected for processing (6)
  • src/main/java/ita/tinybite/domain/party/controller/PartyController.java
  • src/main/java/ita/tinybite/domain/party/dto/request/PartyListRequest.java
  • src/main/java/ita/tinybite/domain/party/dto/response/PartyCardResponse.java
  • src/main/java/ita/tinybite/domain/party/enums/PartySortType.java
  • src/main/java/ita/tinybite/domain/party/service/PartyService.java
  • src/main/java/ita/tinybite/global/util/DistanceCalculator.java

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@milowon milowon merged commit d4e760f into main Jan 4, 2026
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants